<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 300px;height: 200px;background-color: aqua;
            color: chartreuse;
            font-size: 50px;
        }
    </style>
</head>
<body>
    <div id="box">
        注意看看看
    </div>
</body>
</html>

<script>
    function adpter(){
        let targetWidth = 960
        let allRem=targetWidth/100
        let deviceWidth = document.documentElement.clientWidth
        let remFont = deviceWidth/allRem
        document.documentElement.style.fontSize= remFont+'px'
    }
    adpter()
    window.onreset=adpter
    const divNode = document.getElementById('box')
    divNode.addEventListener('touchstart',function(){console.log('按下')})
    divNode.addEventListener('touchmove',function(){console.log('滑动')})
    divNode.addEventListener('touchend',function(){console.log('抬起')})
</script>